import os
from setuptools import setup

from torch.utils.cpp_extension import BuildExtension,CppExtension

sources = ['src/lib_cffi.cpp']
headers = ['src/lib_cffi.h']
extra_objects = ['src/bn.o']
with_cuda = True

this_file = os.path.dirname(os.path.realpath(__file__))
extra_objects = [os.path.join(this_file, fname) for fname in extra_objects]

setup(
        name='_ext',
        ext_modules=[
            CppExtension(
                name='_ext',
                sources=sources,
                include_dirs=extra_objects,
                extra_compile_args=['-g']),
        ],
        cmdclass={
            'build_ext': BuildExtension
        })

